﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WPFWorkbookDesigner.UI
{
    public partial class PasteSpecialWindow : Window
    {
        private static PasteSpecialWindow instance;

        public static void GetInstance()
        {
            if (instance != null)
            {
                instance.Show();
                instance.Activate();
            }
            else
            {
                instance = new PasteSpecialWindow();
                instance.Show();
            }
        }
        public PasteSpecialWindow()
        {
            InitializeComponent();
            Closed += PasteSpecialWindow_Closed;
        }

        private void PasteSpecialWindow_Closed(object sender, EventArgs e)
        {
            instance = null;
            this.Closed -= PasteSpecialWindow_Closed;
            //MessageBox.Show("Closed Event");
        }
    }
}
